Skip to content

Archive: a search of its own (#72) - #73

Merged
gitubpatrice merged 2 commits into
mainfrom
feat/recherche-archives
Nov 18, 2026
Merged

gitubpatrice merged 2 commits into
mainfrom
feat/recherche-archives

Conversation

@gitubpatrice

@gitubpatrice gitubpatrice commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Answers #72 in 3.5.0 (D-051 in docs/16-VERSION-3.5.md).

Since 3.3.0 (D-036), the home screen's search leaves the archived notes out, as notes_tech 2.0.9's did. The Archive had no search field because it would have searched outside the archive, so an archived note could not be found by its title or its content.

Each list searches what it shows

  • Home screen: the notes that are not archived. Unchanged: archiving still takes a note out of the everyday search.
  • Archive: its own notes alone. It is the same query, with n.archived = ? instead of = 0. Both vault guards stay in the query.
  • The global search (magnifier) is unchanged.

In the Archive:

  • the field says where it searches ("Search the archive");
  • results come by relevance, without the month headings, which would repeat;
  • a search with no result says "No results", not "No archived notes", which would read as if the notes were gone.

Entering the Archive already cleared the search. Leaving it now clears it too, rather than going on through the other notes.

Checks

  • Gate: 637 JVM tests, lint, detekt, ktlint.
  • Instrumented on the CI's API 29 image: AccueilTest, AccueilAuDemarrageTest, LegacyDatabaseOpeningTest and RechercheTest all pass, 53 cases.
    • The query test covers the vault guard.
    • The view model test is real: two archived notes, only one holding the word, and a note outside the archive holding it too. A list that ignored the search fails it, and so does a search outside the archive.
  • Negative controls:
    • with the view model listing the whole archive whatever the search, the view model test fails;
    • with the query always searching outside the archive, both tests fail.
  • Tried on a Galaxy S9:
    • the home screen's search does not find an archived note;
    • the Archive's search does, without month headings;
    • an unknown word says "No results";
    • going back to All notes clears the search.
  • Texts: the label in five languages, the 3.5.0 changelogs (430 to 494 characters, under F-Droid's 500), the long description and the README.

Back in the Archive (second commit)

Seen while trying the search on the S9: in the Archive, Back left the app, since 3.3.0. It now returns to the list shown before the Archive, a folder or All notes; a folder deleted meanwhile gives All notes. The open drawer goes first, then a selection, then the Archive. Tested on the screen and through the real view model, with a negative control, and tried on the S9.

No Archive icon in the top bar: it stays in the drawer, above the Trash.

🤖 Generated with Claude Code

gitubpatrice and others added 2 commits November 18, 2026 15:05
…72)

D-051 (3.5.0). Since 3.3.0 (D-036), the home screen's search leaves the
archived notes out, as notes_tech 2.0.9's did, and the Archive had no
search field: it would have searched outside the archive. koad1x could
not find an archived note by its title or content (#72).

Each list now searches what it shows:
- the home screen, the notes that are not archived (unchanged);
- the Archive, its own notes alone: the same query, `n.archived = ?`
  instead of `= 0`. Both vault guards stay in the query.

In the Archive, the field says where it searches; results come by
relevance, without the month headings, and a search with no result says
"No results", not "No archived notes". Entering the Archive cleared the
search already; leaving it now clears it too, rather than going on
through the other notes. The global search (magnifier) is unchanged.

Tests: LegacyDatabaseOpeningTest (query, vault guard included),
AccueilAuDemarrageTest (real view model: two archived notes, one holding
the word, and a note outside the archive holding it too), AccueilTest
(field, months, empty state). Negative controls: the view model listing
the whole archive fails the view model test; the query searching outside
the archive fails both. Tried on the S9.

Texts: label in five languages, changelogs 5081-5083 (430 to 494
characters), long description, README, docs/16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seen by Patrice on the S9 while trying the archive's search: in the
Archive, Back left the app. The archive reads as a screen of its own, and
nothing took Back there since 3.3.0 but the open drawer and a selection.

Back in the Archive now returns to the list shown before it, a folder or
All notes; a folder deleted meanwhile gives All notes. The open drawer
goes first (HomeRoute), then a selection, then the Archive (HomeScreen).
The folder is kept in the saved state, through a process death.

Tests: AccueilTest (Back taken in the Archive, the selection first; the
control: nothing takes it on an ordinary list), AccueilAuDemarrageTest
(real view model: back to the folder, not to All notes). Negative
control: both fail with the fix undone. Tried on the S9.

No Archive icon in the top bar (Patrice): it stays in the drawer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitubpatrice
gitubpatrice merged commit 6dd47e5 into main Nov 18, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant